package mvc;


public class URIMappingBuilder {

    private String uri;
    private IModelCreator modelCreator;
    private Class controller;
    private String view;
   
	private URIMappingBuilder() { }

    public static URIMappingBuilder uriMapping() {
        return new URIMappingBuilder();
    }

    public URIMapping build() {
        URIMapping mapping = new URIMapping();
        mapping.setUri(uri);
        mapping.setModelCreator(modelCreator);
        mapping.setController(controller);
        mapping.setView(view);
        return mapping;
    }

    public URIMappingBuilder withUri(String uri) {
        this.uri = uri;
        return this;
    }

    public URIMappingBuilder with(IModelCreator modelCreator) {
        this.modelCreator = modelCreator;
        return this;
    }

    public URIMappingBuilder with(Class controller) {
        this.controller = controller;
        return this;
    }

    public URIMappingBuilder withView(String view) {
        this.view = view;
        return this;
    }

    public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	public IModelCreator getModelCreator() {
		return modelCreator;
	}

	public void setModelCreator(IModelCreator modelCreator) {
		this.modelCreator = modelCreator;
	}

	public Class getController() {
		return controller;
	}

	public void setController(Class controller) {
		this.controller = controller;
	}

	public String getView() {
		return view;
	}

	public void setView(String view) {
		this.view = view;
	}
	
}
